/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.front.service;

import java.util.List;

import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.front.entity.Report;
import com.thinkgem.jeesite.modules.front.dao.ReportDao;

/**
 * 测试报告内容管理Service
 * @author 朱俊吉
 * @version 2017-12-04
 */
@Service
@Transactional(readOnly = true)
public class ReportService extends CrudService<ReportDao, Report> {

	public Report get(String id) {
		return super.get(id);
	}
	
	public List<Report> findList(Report report) {
		return super.findList(report);
	}
	
	public Page<Report> findPage(Page<Report> page, Report report) {
		return super.findPage(page, report);
	}
	
	@Transactional(readOnly = false)
	public void save(Report report) {
		report.setContent(StringEscapeUtils.unescapeHtml4(report.getContent()));
		super.save(report);
	}
	
	@Transactional(readOnly = false)
	public void delete(Report report) {
		super.delete(report);
	}
	
}